package cn.tedu.submarine;

import javax.swing.*;

//水雷潜艇:是海洋对象,也是命
public class MineSubmarine extends SeaObject implements EnemyLife{
    //构造方法
    public MineSubmarine() {
        super(63, 19);
   }

    @Override//重写move
    public void move() {
        x+=speed;//x+(向右)
    }

    //重写getImage()获取图片
    public ImageIcon getImage(){
        return Images.minesubm;//返回水雷潜艇
    }

    @Override
    public int getLife() {
        return 1;//打中水雷潜艇,战舰得1条命
    }
}
